﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
namespace MainWebService
{
    public class Questions
    {
        public int QuestionId { get; set; }
        public string QuestionText { get; set; }
        public string QuestionType { get; set; }
        public bool IsNumeric { get; set; }
        private List<string> _answer;
        public List<string> AnswerOptions
        {
            get { return _answer; }
            set
            {
                _answer = new List<string>();
                if (value!=null && value.Count>0)
                {
                    foreach (string item in value)
                    {
                        _answer.Add(item);
                    }  
                }
            }

        }

        public DataSet ServicesList { get; set; }
        public string CreateDate { get; set; }
        public int UserId { get; set; }

        public string QuestionSubType { get; set; }
        public bool IsBeforSubmittingScan { get; set; }
        public bool IsAfterSubmittingScan { get; set; }
        public bool IsSubmittingValidScan { get; set; }
        public bool IsSubmittingInValidScan { get; set; }
        internal string AddQuestion(Questions objQues)
        {
            QuestionOperations _qOps = new QuestionOperations();
            return _qOps.AddQuestion(objQues);
        }

        internal List<Questions> GetQuestions(int clientId, string hashCode)
        {
            QuestionOperations _qOps = new QuestionOperations();
            return _qOps.GetQuestions(clientId,hashCode);
        }
    }
}